<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>htmx</title>
    <script src="https://unpkg.com/htmx.org@1.9.12"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .user-card {
            border: 1px solid #ccc;
            padding: 10px;
            margin: 10px 0;
            border-radius: 5px;
            box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
            margin:10px
        }
    </style>
</head>

<body>
    <button hx-get="http://localhost:3000/info0" hx-target="#result" hx-swap="innerHTML">
        点我获取内容
    </button>
    <div id="result"></div>
    -------
    <div 
    id="article-container"
    hx-get="http://localhost:3000/api/home-articles"    
    hx-trigger="load"              
    hx-swap="innerHTML"            
    style="min-height: 200px;"
  >
    <!-- 加载中提示（请求完成前显示） -->
    <div style="text-align: center; padding: 40px; color: #666;">
      加载中...
    </div>
  </div>
</body>

</html>